<?php /* Smarty version 2.6.26, created on 2013-10-07 14:23:17
         compiled from user_checklist.tpl */ ?>
<form method="post" class="form-checklist">
<div id="navbar1" class="navbar1 header-user-checklist clearfix">
	<div class="site-wrap2 clearfix medium">
		<div class="logoPhoto bigger pull-left"><a href="#"></a></div>
	</div>
	<div class="notice-user-box notice-top">
		<div class="site-wrap1">
			<div class="box-ctn-l pull-left">
				<h3>Xin chào! <span><?php echo $this->_tpl_vars['ocUser']['user_fullname']; ?>
</span></h3>
				<p>Chào mừng bạn đã đến với 9PM. Xin mời bạn hãy chọn những lĩnh vực mà bạn muốn quan tâm <i>(Tối thiểu 5 lĩnh vực)</i></p>
			</div>
			<div class="box-btn-r pull-right">
				<a href="#"><span class="btn-next">Lưu lại</span></a>
			</div>
		</div>
	</div>
</div>
<div class="site-wrap2 clearfix" style="padding-bottom:100px">
<div class="clearfix"> 
	<div class="box-type-care">
		<ul class="list-type-care clearfix">
			<?php $_from = $this->_tpl_vars['aCat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['cat']):
?>
			<?php if ($this->_tpl_vars['id'] != 23): ?>
			<li>
				<div class="type-care type-sm<?php echo $this->_tpl_vars['id']; ?>
 <?php if ($this->_tpl_vars['userCheck'][$this->_tpl_vars['id']]): ?>actived<?php endif; ?>">
					<a href="javascript:void(0)" class="animated-button red pulse">
						<div class="icon"><i class="icon-heart un-check"></i><i class="icon-ok check"></i></div>
						<div class="content">
							<div class="title"><?php echo $this->_tpl_vars['cat']; ?>
</div>
							<i class="icon-type-sm type-sm<?php echo $this->_tpl_vars['id']; ?>
"></i>
						</div>
					</a>
					<input type="checkbox" class="checkbox" name="user_checklist[]" value="<?php echo $this->_tpl_vars['id']; ?>
" <?php if ($this->_tpl_vars['userCheck'][$this->_tpl_vars['id']]): ?>checked="checked"<?php endif; ?> />
				</div>
			</li>
			<?php endif; ?>
			<?php endforeach; endif; unset($_from); ?>
		</ul>
	</div>
</div>
</form>

<?php echo '
<script>
$(function (){
	$( \'.type-care\' ).click(function(event) {
		$(this).toggleClass("actived");
		var checkBox = $(".checkbox", this);
		checkBox.prop("checked", !checkBox.prop("checked"));
  });
  
  $(\'.form-checklist .btn-next\').click(function (e){
  	e.preventDefault();
  	$(this).parents(\'form\').submit();
  });
  
  $(\'.form-checklist\').submit(function (e){
  	if ($(\'.type-care .checkbox:checked\').length<5){
  		e.preventDefault();
  		alert(\'Bạn vui lòng chọn tối thiểu 5 lĩnh vực!\');
  		return;
  	}
  })
});
</script>
'; ?>
 